string CNetManager::MakeLocalIp()
{
	char hostname[128]={0}; 
	if(gethostname(hostname,128)==0) 
	{ 
		struct hostent *pHost = gethostbyname(hostname); 
		for (int i = 0; pHost != NULL && pHost->h_addr_list[i] != NULL; i++) 
		{ 
			return inet_ntoa(*(struct in_addr *)pHost->h_addr_list[i]); 
		} 
	} 

	

	return "";
}